<?php  if (!defined('BASEPATH')) exit('No direct script access allowed');
// +----------------------------------------------------------------------+
// | Treacle PHP Framework Version 0.10                                   |
// +----------------------------------------------------------------------+
// | Copyright (c) 2007 Treacle.cn All rights reserved.					  |
// +----------------------------------------------------------------------+
// | Licensed under the Apache License, Version 2.0 (the 'License');      |
// | you may not use this file except in compliance with the License.     |
// | You may obtain a copy of the License at                              |
// | http://www.apache.org/licenses/LICENSE-2.0                           |
// | Unless required by applicable law or agreed to in writing, software  |
// | distributed under the License is distributed on an 'AS IS' BASIS,    |
// | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or      |
// | implied. See the License for the specific language governing         |
// | permissions and limitations under the License.                       |
// +----------------------------------------------------------------------+
// | Author: BoPo <ibopo@126.com>										  |
// +----------------------------------------------------------------------+
/**
 * helpers url file
 *
 * @author BoPo <ibopo@126.com>
 * @link http://www.treacle.cn/
 * @copyright Copyright &copy; 2007 Treacle
 * @license http://www.treacle.cn/license/
 * @version $Id$
 * @package helpers
 */
/**
 * Header 路径跳转
 *
 * @access	public
 * @param	string	the URL
 * @param	string	method: location 为跳转 ；refresh 为本页刷新
 * @return	string
 */
function redirect($uri = '', $method = 'location')
{
	switch($method)
	{
		case 'refresh'	:
			header("Refresh:0;url=".Configure::site_url($uri));
			break;
		default			:
			header("location:".Configure::site_url($uri));
			break;
	}
	exit;
}
/*
+---------------------------------------------------------------------------
|   Last Modified By BoPo
|   Date: Wed Nov 07 23:53:22 CST 2007
+--------------------------------------------------------------------------
*/
?>